package com.rectcircle.wechat.msg.vo;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class KfMessage {	
	
	@Override
	public String toString() {
		return "KfMessage [touser=" + touser + ", msgtype=" + msgtype + ", customservice=" + customservice + ", text="
				+ text + ", image=" + image + ", voice=" + voice + ", video=" + video + ", music=" + music + ", news="
				+ news + ", mpnews=" + mpnews + ", wxcard=" + wxcard + "]";
	}

	private String touser = null;
	
	private String msgtype = null;
	
	private Map<String, String> customservice = null;
	
	private Map<String, String> text = null;
	private Map<String, String> image = null;
	private Map<String, String> voice = null;
	private Map<String, String> video = null;
	private Map<String, String> music = null;

	private Map<String, List<NewsItem>> news = null;

	private Map<String, String> mpnews = null;

	private Map<String, String> wxcard = null;

	public void setTextContent(String content){
		text = new HashMap<>();
		text.put("content", content);
	}
	
	public KfMessage() {

	}

	public KfMessage(String touser, String msgtype) {
		super();
		this.touser = touser;
		this.msgtype = msgtype;
	}

	public Map<String, String> getCustomservice() {
		return customservice;
	}

	public Map<String, String> getImage() {
		return image;
	}

	public Map<String, String> getMpnews() {
		return mpnews;
	}

	public String getMsgtype() {
		return msgtype;
	}

	public Map<String, String> getMusic() {
		return music;
	}

	public Map<String, List<NewsItem>> getNews() {
		return news;
	}

	public Map<String, String> getText() {
		return text;
	}

	public String getTouser() {
		return touser;
	}

	public Map<String, String> getVideo() {
		return video;
	}

	public Map<String, String> getVoice() {
		return voice;
	}

	public Map<String, String> getWxcard() {
		return wxcard;
	}

	public void setCustomservice(Map<String, String> customservice) {
		this.customservice = customservice;
	}

	public void setImage(Map<String, String> image) {
		this.image = image;
	}

	public void setMpnews(Map<String, String> mpnews) {
		this.mpnews = mpnews;
	}

	public void setMsgtype(String msgtype) {
		this.msgtype = msgtype;
	}

	public void setMusic(Map<String, String> music) {
		this.music = music;
	}

	public void setNews(Map<String, List<NewsItem>> news) {
		this.news = news;
	}

	public void setText(Map<String, String> text) {
		this.text = text;
	}

	public void setTouser(String touser) {
		this.touser = touser;
	}

	public void setVideo(Map<String, String> video) {
		this.video = video;
	}
	
	public void setVoice(Map<String, String> voice) {
		this.voice = voice;
	}
	
	public void setWxcard(Map<String, String> wxcard) {
		this.wxcard = wxcard;
	}

	public void setImageId(String imageId) {
		image = new HashMap<>();
		image.put("media_id", imageId);
	}

	public void setVoiceId(String voiceId) {
		voice = new HashMap<>();
		voice.put("media_id", voiceId);		
	}

	public void setVideoInfo(String media_id, String thumb_media_id, String title, String description) {
		video = new HashMap<>();
		video.put("media_id", media_id);
		video.put("thumb_media_id", thumb_media_id);
		video.put("title", title);
		video.put("description", description);
		
	}

	public void setMusicInfo(String musicurl, String hqmusicurl, String thumb_media_id, String title,
			String description) {
		music = new HashMap<>();
		music.put("musicurl", musicurl);
		music.put("hqmusicurl", hqmusicurl);
		music.put("thumb_media_id", thumb_media_id);
		music.put("title", title);
		music.put("description", description);
	}

	public void setArticles(List<NewsItem> articles) {
		news = new HashMap<>();
		news.put("articles", articles);
	}

	public void setMpNewsMedia_id(String media_id) {
		mpnews = new HashMap<>();
		mpnews.put("media_id", media_id);
	}

	public void setWxcardInfo(String card_id) {
		wxcard = new HashMap<String, String>();
		wxcard.put("card_id",card_id);		
	}

	public void setKf_account(String kf_account) {
		if(kf_account!=null){
			customservice = new HashMap<>();
			customservice.put("kf_account", kf_account);
		}
		
	}
	
}
